<template>
    <!-- isShow -->
    <div class="dashboard-editor-container" v-if="false">
      <panel-group @handleSetLineChartData="handleSetLineChartData" />

    </div>
  <div v-else class="welcome">

    <p>Hello,欢迎使用{{title}}</p>
  </div>

</template>
<script>
  import PanelGroup from './dashboard/PanelGroup';
  import settings from  '@/settings.js';

  // import LineChart from './dashboard/LineChart'
  // import RaddarChart from './dashboard/RaddarChart'
  // import PieChart from './dashboard/PieChart'
  // import BarChart from './dashboard/BarChart'
  var a;
  var b;
  var c=[];
  //将下面的数据常量改为从后端获取的动态数据，模拟数据量为2万条时的本地速度
  //import { listSsdata, getSsdata, delSsdata, addSsdata, updateSsdata, exportSsdata } from "@/api/data/ssdata";
  // const lineChartData = {
  //   newVisitis: {
  //     expectedData: [],
  //     actualData: [120, 82, 91, 154, 162, 140, 145]
  //   },
  //   messages: {
  //     expectedData: [200, 192, 120, 144, 160, 130, 140],
  //     actualData: [180, 160, 151, 106, 145, 150, 130]
  //   },
  //   purchases: {
  //     expectedData: [80, 100, 121, 104, 105, 90, 100],
  //     actualData: [120, 90, 100, 138, 142, 130, 130]
  //   },
  //   shoppings: {
  //     expectedData: [130, 140, 141, 142, 145, 150, 160],
  //     actualData: [120, 82, 91, 154, 162, 140, 130]
  //   }
  // }

  export default {
    name: 'Index',
    components: {
      PanelGroup
      // LineChart,
      // RaddarChart,
      // PieChart,
      // BarChart
    },
// queryParams: {
//     pageNum: 1,
//     pageSize: 100,
//     companyId: undefined,
//     deviceCode: undefined,
//     electricSy: undefined,
//     electricG: undefined,
//     temperatureWd: undefined,
//     temperatureA: undefined,
//     temperatureB: undefined,
//     temperatureC: undefined,
//     temperatureN: undefined,
//     electricA: undefined,
//     electricB: undefined,
//     electricC: undefined,
//     voltageA: undefined,
//     voltageB: undefined,
//     voltageC: undefined,
//     positiveActive: undefined,
//     negativeActive: undefined,
//     createTime: undefined,
//     bz: undefined,
//     deviceNo: undefined,
//     electricALoss: undefined,
//     electricBLoss: undefined,
//     electricCLoss: undefined,
//     electricDLoss: undefined,
//     electricAllLoss: undefined,
//     voltageImbalance: undefined,
//     electricImbalance: undefined,
//     lddl: undefined,
//     sd: undefined,
//     energyconsumption: undefined,
//     batterystate: undefined,
//     switchstate: undefined,
//     timescale: undefined,
//     power: undefined,
//     harmonic: undefined,
//     frequency: undefined,
//     gateMagnetism: undefined,
//     waterOut: undefined,
//     cell: undefined
// },
// ssdataList: [],
    data() {
      return {
        // lineChartData: lineChartData.messages,
        // ssdataList: [],
        // sysTitle:undefined
        // 表格数据
        dataList: null,
        dataList2: null,
        isShow: false,
        title: settings.title
      }

    },
    created(){
      // findUser().then(response => {
      //   this.isShow = response.data;
      // });

      // this.getConfigKey("sys.title").then(response => {
      //   this.sysTitle = response.msg;
      // });
    },
    methods: {
      findUser() {

      },

      getOEMSubjectList() {
        getOEMSubjectList().then(response => {
          this.dataList2 = response.data;
        });
      },
      handleSetLineChartData(type) {
        // debugger;
        //  listSsdata(this.queryParams).then(response => {
        //   debugger;
        //   this.ssdataList = response.rows;
        //   //alert(this.ssdataList)
        //   a=this.ssdataList[0].voltageA;
        //   c=this.ssdataList;
        //   //alert(a);
        //   //alert(c);
        //   var item = [];
        //   for (var j = 0; j < c.length; j++) {
        //       item.push(c[j].voltageA);
        //   }
        //   var item1= [];
        //   for (var j = 0; j < 7; j++) {
        //       item1.push(c[j].lddl);
        //   }
        //   var sj={}
        //   sj.expectedData=item1;
        //   sj.actualData=item1;
        //   this.lineChartData =sj
        //
        // });
        //this.lineChartData = lineChartData[type]



      }
    }
  }
</script>
<style scoped>
  .more{
    background: #FFFFFF;
    text-align: center;
    padding: 10px 0;
    color: #606266;
    cursor: pointer;
  }
  .app-container li{
    padding: 0;
  }
  .welcome{
    margin: auto;
    margin-top: 100px;
    justify-content: center;
    align-items: center;
    width: 852px;
    height: 596px;
    background-image: url("../assets/image/index.png");
    background-size:100% 100%;
  }
  .welcome p{
    text-align: center;
    font-size: 24px;
    color: #ffffff;
    padding-top: 5%;
  }
</style>

<style lang="scss" scoped>
.dashboard-editor-container {
  padding: 32px;
  background-color: rgb(240, 242, 245);
  position: relative;

  .chart-wrapper {
    background: #fff;
    padding: 16px 16px 0;
    margin-bottom: 32px;
  }
  .app-container {

  }

}

@media (max-width:1024px) {
  .chart-wrapper {
    padding: 8px;
  }
}
</style>
